home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
allfiles
/
angry
/
tomas.dir
/
00001_Script_handlers
next >
Wrap
Text File
|
1999-03-01
|
3KB
|
109 lines
global loop_count
global pointy, pointym
global currentPups
on startMovie
set loop_count = 0
set pointy = the number of member "pointy"
set pointym = the number of member "pointy_mask"
puppetSprite 43, TRUE
set currentPups = [43]
-- set the exitLock to TRUE
end
on keyDown
set inKey = the key
if inKey = "q" OR inKey = "Q" then go to frame "quitArtRight" of movie "intro"
set keyVal = value(inKey)
if not(voidP(keyVal)) then
if keyVal <= 7 then set the soundLevel to keyVal
else set the soundLevel to 7
end if
end
on autoPuppet theseSprites, toThis
repeat with x = 1 to count(theseSprites)
puppetSprite getAt(theseSprites, x), toThis
end repeat
end
on sliceTime
set currentTime = the long time
set startHere = 1
set hourFind = timeSort(startHere, currentTime, ":")
set theHour = getAt(hourFind, 1)
if the number of chars in theHour = 2 then
set hour1 = char 1 of theHour
set hour2 = char 2 of theHour
else
set hour1 = VOID
set hour2 = char 1 of theHour
end if
set startHere = getAt(hourFind, 2)
set minuteFind = timeSort(startHere, currentTime, ":")
set theMinute = getAt(minuteFind, 1)
set min1 = char 1 of theMinute
set min2 = char 2 of theMinute
set startHere = getAt(minuteFind, 2)
set secondFind = timeSort(startHere, currentTime, " ")
set theSecond = getAt(secondFind, 1)
set sec1 = char 1 of theSecond
set sec2 = char 2 of theSecond
set startHere = getAt(secondFind, 2)
set amPmFind = timeSort(startHere, currentTime, "")
set theAMPM = getAt(amPmFind, 1)
set returnMe = [hour1, hour2, min1, min2, sec1, sec2, theAMPM]
return returnMe
end
on timeSort startHere, currentTime, thisEnd
repeat with x = startHere to the number of chars in currentTime
if char x of currentTime = thisEnd then
exit repeat
else
set returnMe = returnMe & char x of currentTime
end if
end repeat
return [returnMe, x+1]
end
on idle
-- checkExit
if the frame > 9 then
set nowTime = sliceTime()
repeat with a = 1 to count(nowTime)
set thisnumber = getAt(nowTime, a)
if not(voidP(value(thisnumber))) OR thisnumber = "AM" OR thisnumber = "PM" then
set the member of sprite(29+a) to member getAt(nowTime, a)
else
set the member of sprite(29+a) to member "0"
end if
end repeat
end if
end